----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure5.log
  log type:  text
 opened on:   3 Dec 2023, 18:09:09

. 
. version 16      

. 
. use "$data/ctctaxsim_mar1kid1.dta", clear

. append using "$data/ctctaxsim_mar1kid2.dta"
(label YEAR already defined)

. append using "$data/ctctaxsim_mar1kid3.dta"
(label YEAR already defined)

. tab depx

       depx |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     20,000       33.33       33.33
          2 |     20,000       33.33       66.67
          3 |     20,000       33.33      100.00
------------+-----------------------------------
      Total |     60,000      100.00

. 
. sum fiitax earnings fedtaxlessctc v25 totctc

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      fiitax |     60,000   -902.5994    4682.152    -9708.5     9338.5
    earnings |     60,000      49.995    28.86775          0      99.99
fedtaxless~c |     60,000    1616.028    4785.037      -6431    10338.5
         v25 |     60,000    1.601453    2.071323          0      6.431
      totctc |     60,000    2.518628    1.614441          0          6

. replace earnings=earnings*1000
(59,994 real changes made)

. replace ctc=ctc*1000
(60,000 real changes made)

. replace v25=v25*1000
(30,208 real changes made)

. replace totctc=totctc*1000
(58,344 real changes made)

. sum fiitax earnings fedtaxlessctc v25 totctc

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      fiitax |     60,000   -902.5994    4682.152    -9708.5     9338.5
    earnings |     60,000       49995    28867.75          0      99990
fedtaxless~c |     60,000    1616.028    4785.037      -6431    10338.5
         v25 |     60,000    1601.453    2071.323          0       6431
      totctc |     60,000    2518.628    1614.441          0       6000

. 
. gen avgtaxrate=fiitax/earnings
(6 missing values generated)

. gen avgtaxrate2021=fedtaxlessctc/earnings       /* Don't include new CTC */
(6 missing values generated)

. 
. gen avgtaxeitc=-v25/earnings
(6 missing values generated)

. gen avgtaxctc=-totctc/earnings
(6 missing values generated)

. gen avgtaxctc2021=0

. 
. gen avgtaxeitcctc=avgtaxeitc+avgtaxctc
(6 missing values generated)

. 
. *br avgtaxrate avgtaxeitcctc avgtaxeitc avgtaxctc earnings year depx if year==20
> 18
. *br avgtaxrate avgtaxeitcctc avgtaxeitc avgtaxctc earnings year depx avginctax i
> f year==2017
. gen avginctax=avgtaxrate- avgtaxeitcctc
(6 missing values generated)

. 
. tab year avginctax if earnings==40000 & depx==1

    census |       avginctax
      year |   .037875        .04 |     Total
-----------+----------------------+----------
      2017 |         1          0 |         1 
      2018 |         0          1 |         1 
-----------+----------------------+----------
     Total |         1          1 |         2 

. replace avginctax=avginctax*.04/.037875 if year==2017
(23,260 real changes made)

. tab year avginctax if earnings==40000 & depx==1

    census | avginctax
      year |       .04 |     Total
-----------+-----------+----------
      2017 |         1 |         1 
      2018 |         1 |         1 
-----------+-----------+----------
     Total |         2 |         2 

. 
. foreach var in avgtaxeitc avgtaxctc avgtaxctc2021 avginctax{
  2.         replace `var'=-`var'
  3. }
(30,208 real changes made)
(58,344 real changes made)
(0 real changes made)
(47,588 real changes made)

. 
. foreach var in avgtaxeitc avgtaxctc avgtaxctc2021 avginctax{
  2.         replace `var'=`var'+1
  3. }
(59,994 real changes made)
(59,994 real changes made)
(60,000 real changes made)
(59,994 real changes made)

. 
. replace avgtaxrate=-avgtaxrate+1
(59,994 real changes made)

. replace avgtaxrate2021=-avgtaxrate2021+1
(59,994 real changes made)

. 
. twoway line avgtaxrate earnings if year==2017 & depx==1, lp(-) pstyle(p1) || lin
> e avgtaxrate earnings if year==2018 & depx==1, lp(_) pstyle(p2) || line avgtaxra
> te2021 earnings if year==2018 & depx==1, pstyle(p1) graphregion(color(white)) bg
> color(white) leg(order(1 "2017" 2 "2020" 3 "2021") c(1) pos(2) ring(0)) ytitle("
> Net Return to Work") xtitle("Earnings" "{bf:Panel A: One Child}")  ylabel(.75(.2
> 5)1.5)

. graph save "$output/avgtax_mar1kid1.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtax_mar1kid1.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtax_mar1kid1.gph saved

. 
. twoway line avgtaxrate earnings if year==2017 & depx==2, lp(-) pstyle(p1) || lin
> e avgtaxrate earnings if year==2018 & depx==2, lp(_) pstyle(p2) || line avgtaxra
> te2021 earnings if year==2018 & depx==2, pstyle(p1) graphregion(color(white)) bg
> color(white) leg(order(1 "2017" 2 "2020" 3 "2021") c(1) pos(2) ring(0)) ytitle("
> Net Return to Work") xtitle("Earnings" "{bf:Panel B: Two Children}")  ylabel(.75
> (.25)1.5)

. graph save "$output/avgtax_mar1kid2.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtax_mar1kid2.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtax_mar1kid2.gph saved

. 
. twoway line avgtaxrate earnings if year==2017 & depx==3, lp(-) pstyle(p1) || lin
> e avgtaxrate earnings if year==2018 & depx==3, lp(_) pstyle(p2) || line avgtaxra
> te2021 earnings if year==2018 & depx==3, pstyle(p1) graphregion(color(white)) bg
> color(white) leg(order(1 "2017" 2 "2020" 3 "2021") c(1) pos(2) ring(0)) ytitle("
> Net Return to Work") xtitle("Earnings" "{bf:Panel C: Three Children}")  ylabel(.
> 75(.25)1.5)

. graph save "$output/avgtax_mar1kid3.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/avgtax_mar1kid3.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/avgtax_mar1kid3.gph saved

. 
. graph combine "$output/avgtax_mar1kid1.gph" "$output/avgtax_mar1kid2.gph" "$outp
> ut/avgtax_mar1kid3.gph" ,graphregion(color(white)) 

. graph export "$output/figure5.png", replace
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/figure5.png saved as PNG format

. 
. erase "$output/avgtax_mar1kid1.gph" 

. erase "$output/avgtax_mar1kid2.gph" 

. erase "$output/avgtax_mar1kid3.gph"

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure5.log
  log type:  text
 closed on:   3 Dec 2023, 18:09:14
----------------------------------------------------------------------------------
